<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="./lib/Zhang.js"></script>
</head>
<body>
    <div id="root"></div>
</body>
<script>
    const data = {
        a:1,
        b:2
    }
    const zm = new Zhang({
        el:"#root",
        data,
        created(){
            setTimeout(()=>{
                console.log(this===zm,this.a,this.b);
            })

        },
        methods:{
            run(){
                // console.log("run",this === zm);
                this.a = 1000;
                // console.log(this.a,this.b);
            }
        }
    });
    // console.log(zm.$data === data);// true
    zm.run();
    console.log(data.a,zm.$data.a);// 1000 1000
</script>
</html>